package com.whpu.utils;

import redis.clients.jedis.Jedis;

/**
 * Created by RiceBall on 2020/10/3 11:13
 */
public class JedisUtil {
    private static final String HOST = "127.0.0.1";
    private static final int PORT = 6379;

    /**
     * 获取Jedis
     *
     * @return
     */
    public static Jedis getJedis() {
        Jedis jedis = new Jedis(HOST, PORT);
        return jedis;
    }

    /**
     * 关闭Jedis
     */
    public static void close(Jedis jedis) {
        if (jedis != null) {
            jedis.close();
        }
    }

    public static void main(String[] args) {
        System.out.println(Long.toHexString(0x1000000 + 0xbecdbabe));
    }

}
